﻿                          Copyright © 2018 Honeywell International Inc. All rights reserved.

                                    R E A D M E


Scanner Management Utility(SMU) v3.0.0.2
===========================================================================


1. Overview
----------------------
The Honeywell Command Line Scanner Management Utility Tool is a batch utility that allows users to download the given EXM file to the scanner, retrieve the scanner configuration to the given EXM, upgrade the scanner firmware with the given MOC and  send the given string as a SYN-M or SYN-Y menu command to Honeywell scanner.
	
2. How to use
----------------------
This tool is a command line tool. Microsoft Visual C++ 2010 Redistributable Package is prerequisite for running this tool.
The NULL driver needs to be installed on Windows 8.1 and Windows 10 in order to associate Honeywell Scanner device when configured as USB HID barcode or USB Keyboard scanner. More details, please refer to the readme of NULL driver.

The syntax of the command is:
	smu.exe {[/exmset <file>] | [/exmget <file>] | [/upg <file>] | [/cmd <string>] | [/cmdy <string>]} [/timeout <0…>] [/port <0,1,2…>] [/model <string>] [/loglevel <0-4>]

Description:
  Mandatory Arguments: *Only one of the following*
        /exmset :  Will download the given EXM file to the scanner.
        /exmget :  Will retrieve the scanner configuration to the given EXM.
        /upg :  Will upgrade the scanner firmware with the given MOC.
        /cmd : Will send the given string as a SYN-M menu command. Scanner response will be dumped to standard output.
        /cmdy : Like /cmd, but as a SYN-Y menu command.
  Optional Arguments:
        /timeout:  Indicates maximum time to wait for a scanner reply, in milliseconds. Default = 5000 ms.
        /port:  Indicates where to look for the scanner.
					0 = Parallel Auto detection (default) for the following interfaces:
						a.	USB ReM Interface
						b.	USB ReM Legacy Interface
						c.	USB HID Barcode Scanner
						d.	USB Serial and RS232 ports (in this order, for each COM present where at least one modem signal is active)
					Any other = Fixed COM port (USB Serial or RS232)
		/interface:  Indicate which interface to look for device by. If there are more than 1 devices found, SMU will operate on the 1st one.
					- /port is 0 or no /port specified
						0 - USB HIDPOS
						1 - USB Serial
						2 - USB ReM
						3 - ReM Legacy (The 2nd interface for USB HID Keyboard device)
						4 - RS232
						5 - BTSPP

					- /port is 1,2,3..., /interface is ignored. 
        /model:  Device’s name (SYN-Y P_NAME) must match the provided string.
        /loglevel:  Logging level [0 to 4]. Default = 0.

Exit codes:		
		cmd and cmdy Exit codes:
			0=ACK				Success: Scanner replied with ACK 
			1=ENQ				Error: Menu Command not recognized
			2=NAK				Error: Menu Command recognized but rejected
			3=TIMEOUT 			Error: Timeout awaiting for a device response
			For multiple menu commands, SMU will return 0 only if all of the menu commands return ACK. Otherwise, SMU will set the last NAK or ENQ as the return code. Please reference to examples (13).
		exmset,exmget,upg Success Exit codes:
			0=SUCCESS			Success: the operation(exmset,exmget or upg) is successful.
		other Fail Exit codes:
			4=NO_DEVICE			Error: Did not find a scanner 
			5=TIMEOUT_INVALID		Error: The timeout value is invalid
			6=ParseCmdLine_ERROR		Error: Command line arguments are invalid
			[7,13]=SDK_DIS_INTER_ERROR	Error: SDK Discovery internal error
			[14,19]=SDK_DC_INTER_ERROR	Error: SDK Datacollection internal error
			[20,23] = SDK_CONNECTION_INTER_ERROR Error: SDK Collection internal error
			[24,41] = SDK_UPG_INTER_ERROR Error: SDK Flash firmware internal error
			[42,241] = DSM_INTER_ERROR Error: DSM internal error
	 
3. Examples
----------------------
(1) 
	smu.exe /exmset golden.exm 
	Action: Pushed the golden.exm settings to the first autodetected scanner
    Exit code: 0
	Outputs: None
(2) 
	smu.exe /exmset golden.exm /port 2 
	Action: Pushed the golden.exm settings to the scanner connected in COM2
	Exit code: 0
	Outputs: None
(3) 
	smu.exe /exmget myconfig.exm	
	Action: Retrieves the scanner configuration to a file called myconfig.exm
	Exit code: 0
	Output: None
(4) 
	smu.exe /upg BJ000180AAA.moc
	Action: Upgrades the scanner firmware to BJ000180AAA.moc
	Exit code: 0
	Output: None
(5) 
	smu.exe /upg BJ000180AAA.moc /port 21 /model 1900
	Action: Looks for a 1900 scanner connected to COM21, and if present, upgrades its firmware to BJ000180AAA.moc
	Exit code: 0
	Output: None
(6) 
	smu.exe /exmget myconfig.exm /loglevel 4
	Action: Retrieves the scanner configuration to a file called myconfig.exm, and creates file smu.log with detailed logging
	Exit code: 0
	Output: None
(7) 
	smu.exe /cmd C39ENA1.
	Action: Turns on Code 39
	Exit code: 0
	Outputs: "C39ENA1[ACK]." to standard output, where [ACK] represents character 0x06
	
(8)
	smu.exe /cmd C39ENA1;128ENA0.
	Action: Turns on Code 39 and off Code 128
	Exit code: 0
	Outputs: "C39ENA1[ACK];128ENA0[ACK]." to standard output, where [ACK] represents character 0x06

(9)
	smu.exe /cmd ABCENA1;C39ENA1.
	Action: Turns on Code 39 and off Code 128
	Exit code: 1
	Outputs: "ABCENA1[ENQ];C39ENA1[ACK]." to standard output, where [ACK] represents character 0x06 and [ENQ] represents character 0x05

(10)
	smu.exe /cmd P_INFO. /timeout 20000>file.txt
	Action: Queries for P_INFO and re-direct the output to file.txt
	Exit code: 0
	Outputs: save output P_INFO to file.txt

(11) 
	smu.exe /cmd C39ENA1. /t abc
	Action: Turns on Code 39
	Exit code: 5
	Outputs: Timeout value is invalid

(12)
	smu.exe /cmdy pdfsym?.
	Action: Query pdf-417 setting using SYN-Y
	Exit code: 0
	Outputs: "PDFSYM1[ACK]." to standard output, where [ACK] represents character 0x06

(13)
	smu.exe /cmd ABCENA1;C39ENA1;232BAD18.
	Action: Turns on Code 39, off Code 128 and set badrate to unsupported value
	Exit code: 2
	Outputs: "ABCENA1[ENQ];C39ENA1[ACK];232BAD18[NAK]." to standard output, where [ACK] represents character 0x06 ,[ENQ] represents character 0x05 and [NAK] represents character 0x15
	
(14)
	smu.exe /exmget myconfig.exm /interface 0
	Action: Search for the scanner with USB HIDPOS interface, retrieves the scanner configuration to a file called myconfig.exm
	Exit code: 0
	Output: None
	
(15)
	smu.exe /exmset myconfig.exm /interface 3
	Action: Download the myconfig.exm to the scanner with ReM Legacy interface
	Exit code: 0
	Output: None